package com.zzyl.nursing.mapper.member;

import com.zzyl.nursing.domain.FamilyMemberElder;
import com.zzyl.nursing.vo.FamilyMemberElderPageVo;
import com.zzyl.nursing.vo.FamilyMemberElderVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zbr
 * @version 1.0
 * @since 2025/3/12 18:18
 */
@Mapper
public interface MemberElderMapper {

    /**
     * 查询已经绑定的老人id
     * @param memberId
     * @return
     */
    List<Long> findElderIdByMemberId(Long memberId);

    /**
     * 插入绑定信息
     * @param familyMemberElder 绑定信息
     */
    void insert(FamilyMemberElder familyMemberElder);

    /**
     * 查询绑定信息
     * @param userId
     * @return
     */
    List<FamilyMemberElderVo> getMyFamilyMemberElder(Long userId);

    /**
     * 获取用户绑定家人分页列表
     * @param userId
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<FamilyMemberElderPageVo> getMyFamilyMemberElderPage(@Param("userId") Long userId);
}
